<?php

namespace admin\controllers;

class ActiveAction extends \soushu\crud\Action
{
    /**
     * 启用/禁用
     */
    public function run($id, $op)
    {
        $model = $this->findModel($id);

        $op ? $model->enable() : $model->disable();
        
        return $this->controller->back();
    }
}
